package com.jit.app.service;

import android.os.Binder;
import android.os.Handler;

public class DownloadBinder extends Binder {

    DownloadService downloadService;

    public DownloadBinder(){}
    public DownloadBinder(DownloadService downloadService){
        this.downloadService = downloadService;
    }


    public void addHandler(Handler handler){
        downloadService.handlers.add(handler);
    }
    public void removeHandler(Handler handler){
        downloadService.handlers.remove(handler);
    }

    public Double getDownloadProcess(String pack){
        return downloadService.downloadProcess.get(pack);
    }

    public void addDownloadTask(String pack, String downloadLink){
        downloadService.download(pack,downloadLink);
    }


}
